{template 'common/header'}
<div id="menu">
    <ul class="nav nav-tabs">
        <li {if $_GPC['action'] == ''}class="active"{/if}>
        <a href="{php echo $this->createWebUrl('income', array('action' => ''));}">收入记录</a>
        </li>
        <li {if $_GPC['action'] == 'tixian'}class="active"{/if}>
        <a href="{php echo $this->createWebUrl('income', array('action' => 'tixian'));}">支出记录</a>
        </li>
    </ul>
</div>


{if $_GPC['action'] ==''}

<div class="main">
    <div class="panel panel-info">
        <div class="panel-heading">筛选</div>
        <div class="panel-body">
            <form action="{php echo $this->createWebUrl('income')}" method="post" class="form-horizontal">
                <!--<div class="form-group" style="width: 50%;float: left">-->
                    <!--<label class="col-xs-12 col-sm-3 col-md-2 control-label">选择日期</label>-->
                    <!--<div class="col-sm-9 col-md-8 col-lg-8 col-xs-12">-->
                        <!--<input type="text" name="date" value="{$date}" placeholder="请选择日期时间" readonly="readonly" class="datetimepicker form-control" style="padding-left:12px;">-->
                        <!--<script type="text/javascript">-->
                            <!--require(["datetimepicker"], function(){-->
                                <!--var option = {-->
                                    <!--lang : "zh",-->
                                    <!--step : 5,-->
                                    <!--timepicker : false,-->
                                    <!--closeOnDateSelect : true,-->
                                    <!--format : "Y-m-d"-->
                                <!--};-->
                                <!--$(".datetimepicker[name = 'date']").datetimepicker(option);-->
                            <!--});-->
                        <!--</script>-->
                    <!--</div>-->
                <!--</div>-->
                <!--<div class="form-group" style="width: 50%;float: left">-->
                    <!--<label class="col-xs-12 col-sm-3 col-md-2 control-label">用户uid:</label>-->
                    <!--<div class="col-sm-9 col-md-8 col-lg-8 col-xs-12">-->
                        <!--<input type="text" name="uid" value="{$uid}" class="form-control" style="display: inline-block;">-->
                    <!--</div>-->
                <!--</div>-->
                <!--<div class="form-group" style="width: 50%;float: left">-->
                    <!--<label class="col-xs-12 col-sm-3 col-md-2 control-label">用户昵称:</label>-->
                    <!--<div class="col-sm-9 col-md-8 col-lg-8 col-xs-12">-->
                        <!--<input type="text" name="nickname" value="{$nickname}" class="form-control" style="display: inline-block;">-->
                    <!--</div>-->
                <!--</div>-->
                <!--<div class="form-group" style="text-align:center;">-->
                    <!--<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">-->
                        <!--<button class="btn btn-default"><i class="fa fa-search"></i> 搜索</button>-->
                    <!--</div>-->
                <!--</div>-->
                <div class="form-group" style="width: 33%;float: left">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label" >收入</label>
                    <div class="col-sm-9 col-xs-12">
                        <input type="text" value="{$shou}" class="form-control" readonly>
                    </div>
                </div>
                <div class="form-group" style="width: 33%;float: left">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label" >支出</label>
                    <div class="col-sm-9 col-xs-12">
                        <input type="text"  value="{$zhi}" class="form-control" readonly>
                    </div>
                </div>
                <div class="form-group" style="width: 33%;float: left">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label" >结余</label>
                    <div class="col-sm-9 col-xs-12">
                        <input type="text"  value="{php echo $shou-$zhi}" class="form-control" readonly>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>


<table class="table table-hover">
    <thead class="navbar-inner">
    <tr>
        <th>头像</th>
        <th>昵称</th>
        <th>金额</th>
        <th>状态</th>
        <th style="width:250px;">时间</th>
    </tr>
    </thead>
    <tbody>
    {loop $res $v}
    <tr>
        <td><img src="{php echo $v['user']['headimgurl']}" width="50px" height="50px"></td>
        <td>{$v['user']['nickname']}</td>
        <td>{$v['fee']}</td>
        <td>{if $v['zstate'] ==0}投资{else}追加{/if}</td>
        <td>{$v['time']} </td>

    </tr>
    {/loop}
    </tbody>
</table>
<div class="col-xs-12">
    {php echo $pager}
</div>
{/if}


{if $_GPC['action'] =='tixian'}
<table class="table table-hover">
    <thead class="navbar-inner">
    <tr>
        <th>头像</th>
        <th>昵称</th>
        <th>金额</th>
        <th style="width:250px;">时间</th>
    </tr>
    </thead>
    <tbody>
    {loop $res $v}
    <tr>
        <td><img src="{php echo $v['headimgurl']}" width="50px" height="50px"></td>
        <td>{$v['nickname']}</td>
        <td>{$v['tixian_money']}</td>
        <td>{$v['tixian_data']} </td>

    </tr>
    {/loop}
    </tbody>
</table>
<div class="col-xs-12">
    {php echo $pager}
</div>
{/if}





    {template 'common/footer'}
